<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <!-- 基本样式 -->
    <link rel="stylesheet" href="../src/mixins/style/normalize.css" />
    <link rel="stylesheet" href="../src/com_third/font-awesome/css/font-awesome.css">
    <link rel="stylesheet" href="../src/mixins/style/base.css" />

    <!-- 引入样式 -->
    <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
    <link href="https://cdn.bootcss.com/element-ui/2.4.0/theme-chalk/index.css" rel="stylesheet">

    <!-- 当时项目公共样式 -->
    <link rel="stylesheet" href="src/common.css" />

    <style>
    </style>
</head>

<body>

    <div v-cloak class="container clearfix" id="app">

        <m-card class="clearfix" title="查寻条件" :collapse="formCollapse">

            <el-form :inline="true" :model="searchForm" class="demo-form-inline" label-width="90px">
                <el-form-item label="文章标识">
                    <el-input v-model="searchForm.id" placeholder="文章标识"></el-input>
                </el-form-item>
                <el-form-item label="文章标题">
                    <el-input v-model="searchForm.name" placeholder="文章标题"></el-input>
                </el-form-item>


                <el-form-item label="有效性">
                    <el-select v-model="searchForm.dataFlag" placeholder="==请选择==">
                        <el-option v-for="item in Enum.DataFlag" :key="item.value" :label="item.label" :value="item.value">
                        </el-option>
                    </el-select>
                </el-form-item>

                <el-form-item label="一级分类">
                    <el-select v-model="searchForm.parentCategoryId" clearable loading-text="加载中..." @change="categoryChange" filterable placeholder="==请选择==">
                        <el-option v-for="item in OneCategoryList" :key="item.id" :label="item.name" :value="item.id">
                            <span style="float: left">{{ item.name }}</span>
                        </el-option>
                    </el-select>
                </el-form-item>

                <el-form-item label="分类">
                    <el-select v-model="searchForm.categoryId" clearable loading-text="加载中..." filterable placeholder="==请选择==">
                        <el-option v-for="item in TwoCategoryList" :key="item.id" :label="item.name" :value="item.id">
                            <span style="float: left">{{ item.name }}</span>
                        </el-option>
                    </el-select>
                </el-form-item>

            </el-form>
        </m-card>


        <div class="table_search_wrap">
            <el-button type="primary" @click="onSubmit">查询</el-button>
            <el-button class="fr" @click="toggleSearhBodyCollapse">搜索条件切换</el-button>
            <el-button @click="clearSearch">清空条件</el-button>
            <el-button @click="clearThenSearch">清空并搜索条件</el-button>
        </div>

        <el-table class="mt_10 clearfix" :data="tableList" border style="width: 100%">
            <el-table-column prop="id" label="文章标识" width="80">
            </el-table-column>
            <el-table-column prop="parentCategoryName" label="一级分类" width="120">
            </el-table-column>
            <el-table-column prop="categoryName" label="二级分类" width="120">
            </el-table-column>
            <el-table-column prop="title" label="标题">
            </el-table-column>
            <el-table-column prop="dataFlag" label="是否有效" width="120">
                <template slot-scope="scope">
                    <span>{{scope.row.dataFlag==1?"有效":"无效"}}</span>
                </template>
            </el-table-column>
            <el-table-column label="操作" width="150">
                <template slot-scope="scope">
                    <el-button size="mini" type="text" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                    <el-button size="mini" type="text" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>

    </div>

    <script src="../src/lib/jquery.js"></script>
    <script src="../src/lib/sea-all.js"></script>
    <script src="../src/lib/vue.js"></script>
    <script src="../src/lib/vue-router.js"></script>
    <script src="../boot.js"></script>


    <!-- 引入组件库 -->
    <!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
    <script src="https://cdn.bootcss.com/element-ui/2.4.0/index.js"></script>

    <link href="https://cdn.bootcss.com/layer/3.1.0/theme/default/layer.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/layer/3.1.0/layer.js"></script>



    <script>
        $(function () {
            seajs.use('./04_artList.js');
        })
    </script>



</body>

</html>